import request from '@/config/axios'

export interface TaskSensitiveResultVO {
  id: number
  siteId: number
  contentId: number
  sensitiveWord: string
}

// 查询敏感词扫描任务结果列表
export const getTaskSensitiveResultPage = async (params) => {
  return await request.get({ url: '/cms/sensitive-task/page', params })
}

// 查询敏感词扫描任务结果详情
export const getTaskSensitiveResult = async (id: number) => {
  return await request.get({ url: '/cms/sensitive-task/get?id=' + id })
}

// 新增敏感词扫描任务
export const createSensitiveCheckTask = async () => {
  return await request.post({ url: '/cms/sensitive-task/create' })
}

// 删除敏感词扫描任务结果
export const deleteTaskSensitiveResult = async (id: number) => {
  return await request.delete({ url: '/cms/sensitive-task/delete?id=' + id })
}

// 导出敏感词扫描任务结果 Excel
export const exportTaskSensitiveResultApi = async (params) => {
  return await request.download({ url: '/cms/sensitive-task/export-excel', params })
}
